<?php
Header("Content-type: image/PNG");
$code = $_GET['code'];

$height = 30;
$width = 63;
$handle = ImageCreate($width,$height);

$black = ImageColorAllocate($handle, 0, 0, 0);

ImageFill($handle, 0, 0, $black);

for($i=0; $i<strlen($code); $i++) {
  $color = ImageColorAllocate($handle, rand(100,255), rand(100,255), rand(100,255));
  ImageString($handle, 5, 8 + $i*10, 8, $code[$i], $color);  
}
ImagePNG($handle);
ImageDestroy($handle);
?>
